<?php
/**
 * The Sidebar containing the post widget areas.
 *
 * @package WordPress
 * @subpackage Sastro
 * @since Sastro 1.0
 */

global $post;

$pid = nvr_get_postid();
$custom = nvr_get_customdata($pid);
$initial = THE_INITIAL;
$shortname = THE_SHORTNAME;

$defaultsidebar = $shortname . "-sidebar";
$chosensidebar = (isset($custom['_'.$initial.'_sidebar'][0]) && !is_search())? $custom['_'.$initial.'_sidebar'][0] : $defaultsidebar;
?>
<div class="widget-area">
	<?php if ( ! dynamic_sidebar( $chosensidebar ) ) : ?><?php endif; // end general widget area ?>
</div>